﻿@model CultuRAM.Models.Resource

@{
    ViewBag.Title = "Eliminar";
}

<h4>Eliminar Recurso</h4><br/>

@using (Ajax.BeginForm("DeletePv", "Resource", new AjaxOptions
{
    UpdateTargetId = "tabEventResRight",
    InsertionMode = InsertionMode.Replace,
    HttpMethod = "POST",
    OnSuccess = "UpdateEventRes(" + @Model.EventId + ")"
}))
{

    <fieldset>
        <legend>EventPropertyValue</legend>
        @Html.HiddenFor(model => model.ResId)
        @Html.HiddenFor(model => model.EventId, new { id = "EventId" }) @*//NAO ALTERAR*@
        @*@Html.HiddenFor(model => model.Event.Title)*@
        @Html.HiddenFor(model => model.ResTypeId, new { id = "ResTypeId" }) @*//NAO ALTERAR*@
        @Html.HiddenFor(model => model.Name)
        
        <p>
            <span class="display-field">
                <b>@Html.DisplayNameFor(model => model.Name): </b>
            </span>
            <span class="display-field">
                @Html.DisplayFor(model => model.Name)
            </span>
        </p>
        <p>
            <span class="display-field">
                <b>@Html.DisplayNameFor(model => model.ResourceType): </b>
            </span>
            <span class="display-field">
                @Html.DisplayFor(model => model.ResourceType.ResType)
            </span>
        </p>
        <p>
            <span class="display-field">
                <b>@Html.DisplayNameFor(model => model.File): </b>
            </span>
            <span class="display-field">
                @Html.DisplayFor(model => model.File)
            </span>
        </p>
    </fieldset>
    
    <br/><br/>
    <b>ATENÇÃO!</b><br />
    <span>O registo será eliminado definitivamente. Pretende Continuar?</span>
    <p>
        <br/><br />
        <button  type="submit" value="Eliminar" class="btn btn-danger"><i class="icon-ok icon-white"></i> Sim</button>
        
        @Html.Raw(@Ajax.ActionLink("replacetxt", "Default", null, new AjaxOptions()
            {
                UpdateTargetId = "tabEventResRight",
                InsertionMode = InsertionMode.Replace,
                OnSuccess = "ResBgColorClear()",
            }, new { @class = "btn btn-default" })
		            .ToHtmlString().Replace("replacetxt", "<i class=\"icon-ban-circle\"></i> Não"))
    </p>
    
    
}
